home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: macro that return value, how?
- Date: 01 Mar 1996 16:17:59 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Mar1091759@qcd.lanl.gov>
- References: <3133e87b.868433@news.csus.edu> <3136FA60.350B@cmt.lpr.mail.carel.fi>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: Ari Lukumies's message of Fri, 01 Mar 1996 15:23:44 +0200
-
- In article <3136FA60.350B@cmt.lpr.mail.carel.fi>
- Ari Lukumies <aril@cmt.lpr.mail.carel.fi> writes:
-
- <snip>
- AL: This will compile:
- AL:
- AL: #define add1(x) (x += VAR)
- AL:
- AL: Remember, the result of an assignment is implicitly returned. So,
- you can use
- AL: constructs like:
- <snip>
- AL: and
- AL: if (add1(2) == 2)
- AL: DoSomething...
-
- Did you try this?
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-